import request from '@/utils/request'

// 查询仓库管理列表
export function listStock(query) {
  return request({
    url: '/recovery/stock/list',
    method: 'get',
    params: query
  })
}

// 查询仓库管理列表根据权限
export function listStockPower(query) {
  return request({
    url: '/recovery/stock/list/power',
    method: 'get',
    params: query
  })
}

// 查询仓库管理详细
export function getStock(stockId) {
  return request({
    url: '/recovery/stock/' + stockId,
    method: 'get'
  })
}

// 新增仓库管理
export function addStock(data) {
  return request({
    url: '/recovery/stock',
    method: 'post',
    data: data
  })
}

// 修改仓库管理
export function updateStock(data) {
  return request({
    url: '/recovery/stock',
    method: 'put',
    data: data
  })
}

// 删除仓库管理
export function delStock(stockId) {
  return request({
    url: '/recovery/stock/' + stockId,
    method: 'delete'
  })
}

// 导出仓库管理
export function exportStock(query) {
  return request({
    url: '/recovery/stock/export',
    method: 'get',
    params: query
  })
}
